package com.youngking.guns.config;
import com.youngking.guns.modular.system.dao.DictMapper;
import com.youngking.guns.modular.system.model.Dict;
import com.youngking.guns.core.cache.CacheKit;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Controller;

@Configuration
public class DictListenerConfig implements InitializingBean {
    @Autowired
    public DictMapper dictMapper;
    @Override
    public void afterPropertiesSet() throws Exception {
        CacheKit.put("CONSTANT","dictCache",dictMapper.selectList(null));
    }
}